package cn.stylefeng.guns.modular.business.frequency.orderfinishrecord.mapper;

import cn.stylefeng.guns.modular.business.frequency.orderfinish.model.param.FinishRecordDTO;
import cn.stylefeng.guns.modular.business.frequency.ordersub.model.result.PkgOrderFinishRecord;
import cn.stylefeng.guns.modular.business.frequency.statistics.PkgOrderFinish;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.business.frequency.orderfinishrecord.entity.OrderFinishRecord;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 订单交付记录表 Mapper 接口
 *
 * @author yujie
 * @date 2023/05/09 17:16
 */
public interface OrderFinishRecordMapper extends BaseMapper<OrderFinishRecord> {

    PkgOrderFinishRecord getPkgOrderFinishRecordDetailByOrderId(@Param("orderId") Long orderId);

    Page<PkgOrderFinish> getFinishOverListPage(@Param("page") Page page, @Param("orderDTO") FinishRecordDTO orderDTO);


    PkgOrderFinishRecord getPkgOrderFinishRecordDetail(@Param("id") String id);


    @Update("update tt_order_finish_record set contract_path = #{path} where id = #{id}")
    void updatePathById(@Param("id") String id, @Param("path") String path);

}